package main

import (
	"gitee.com/tietang/terrace-go/v2/lib/tollgate/dog"
	"github.com/fukata/golang-stats-api-handler"
	"github.com/shirou/gopsutil/v3/cpu"
	"log"
	"net/http"
)

func main() {

	http.HandleFunc("/sys", dog.SigarHttpHandler())
	http.HandleFunc("/stats", stats_api.Handler)
	http.HandleFunc("/sys2", func(w http.ResponseWriter, request *http.Request) {
		cpu.Info()
	})
	err := http.ListenAndServe(":3009", nil)
	if err != nil {
		log.Fatal("ListenAndServe: ", err)
	}
}
